<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->

<?php

    $id = $_GET['id'];
    include "Employee.php";
    include "EmployeeDao.php";
    include "Datasource.php";

    $tempEmployee = new Employee();
    $employeeDao = new EmployeeDao();
    $conn = new Datasource("localhost","theanykey","root","");

    $tempEmployee = $employeeDao->getObject($conn, $id)

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body onload="postToForm();">



    </body>
    <script type="text/javascript">
        function postToForm()
        {
            w = window.opener;
            w.document.getElementById("empid").value = "<?php echo $tempEmployee->getEmpId(); ?>";
            w.document.getElementById("empfirst").value = "<?php echo $tempEmployee->getFirstName(); ?>";
            w.document.getElementById("emplast").value = "<?php echo $tempEmployee->getLastName(); ?>";
            w.document.getElementById("emplogin").value = "<?php echo $tempEmployee->getLoginID(); ?>";
            w.document.getElementById("emprole").value = "<?php echo $tempEmployee->getRole(); ?>";
            w.document.getElementById("isdeleted").value = "<?php echo $tempEmployee->getIsDeleted(); ?>";

            window.close();

        }

    </script>
</html>
